[CI] Automate AITER prebuilt upload flow with GitHub actions#412
[CI] Automate AITER prebuilt upload flow with GitHub actions#412VeeraRajasekhar merged 5 commits intodevfrom
Conversation
|
This approach does not work.
|
|
I like your idea of creating a separate GHA workflow for this. I feel creating this workflow which accepts a docker image is a better option. I don't see lot of our group is pushing to the aiter artifactory. Creating this workflow will be a good option to increase the cache hit. As per the permissions, we can explore this option |
69e8d2e to
a631973
Compare
|
@ipanfilo @wangye805 PR is ready for review. Summary: Offloaded all upload related functionality from cmake file. Added a new bash script to upload and this is used in the github action file. |
ci/aiter_upload.sh
Outdated
| ROCM_VER="$(head -n1 "${ROCM_PATH}/.info/version" | sed -n 's/^\([0-9]\+\.[0-9]\+\).*/\1/p')" | ||
|
|
||
| AITER_DIR="${ROOT_DIR}/3rdparty/aiter" | ||
| git -C "${AITER_DIR}" config --global --add safe.directory "${AITER_DIR}" >/dev/null |
There was a problem hiding this comment.
Use code from
not to modify repository
.github/scripts/aiter_upload.sh
Outdated
| echo "[AITER-PREBUILT] Building aiter libs for ${ARCHS} ..." | ||
| rm -rf "${AITER_DIR}/aiter/jit/build" | ||
| AITER_LOG_MORE=1 \ | ||
| GPU_ARCHS="${ARCHS}" \ |
There was a problem hiding this comment.
CK_TILE_FLOAT_TO_BFLOAT16_DEFAULT is missed
| -T "${OUTPUT_TGZ}" \ | ||
| "${REMOTE_URL}" \ | ||
| -o /dev/null | ||
| echo "[AITER-PREBUILT] Uploaded tgz to ${REMOTE_URL}" |
There was a problem hiding this comment.
Jfrog is automatically creating a sha256 if we upload a file, so to leverage thatI didn't upload. But in future if we change the storage loc, we might need, so I will upload it.
There was a problem hiding this comment.
If JFrog creates sha256 then it may make more sense to download it and compare with local sha256 to make sure the package uploaded correctly. And if there is no sha256 on server and you want support non-Jfrog servers then upload local sha256 file
There was a problem hiding this comment.
Updated, added functionality to check the sha256 with local
| @@ -0,0 +1,92 @@ | |||
| name: AITER Prebuilt Upload | |||
|
|
||
| - name: Host Diagnostics (upload) | ||
| run: | | ||
| echo "::group::Host Diagnostics" |
There was a problem hiding this comment.
For building this host info is not important
| docker exec \ | ||
| -e NVTE_AITER_PREBUILT_BASE_URL=${NVTE_AITER_PREBUILT_BASE_URL} \ | ||
| -e NVTE_AITER_PREBUILT_UPLOAD_TOKEN=${NVTE_AITER_PREBUILT_UPLOAD_TOKEN} \ | ||
| -e GPU_ARCHS_INPUT="${{ inputs.gpu_archs }}" \ |
There was a problem hiding this comment.
Why this intermediate var is needed?
| exit 1 | ||
| fi | ||
|
|
||
| docker exec \ |
There was a problem hiding this comment.
No need to separate run and exec
| ci/aiter_upload.sh --build | ||
| ' | ||
|
|
||
| - name: Cleanup container |
There was a problem hiding this comment.
If using run --rm, this step is not needed
| @@ -0,0 +1,81 @@ | |||
| #!/usr/bin/env bash | |||
There was a problem hiding this comment.
Add copyright. And maybe move it to .github/scripts/
There was a problem hiding this comment.
Updated, moved to .github/scripts
7c1d132 to
0f313cf
Compare
Add a workflow_dispatch GHA to build/upload aiter prebuilts using a chosen image and GPU arch list, reusing the shell script. Make ci/aiter_upload.sh handle build + package + upload with optional env-based upload, respecting GPU_ARCHS input and defaulting to gfx942;gfx950. Strip upload/packaging logic out of the CMake helper so normal builds only download/use prebuilts.
Move aiter upload helper to .github/scripts, add copyright header, and use a temp gitconfig for safe.directory/commit lookup set CK_TILE_FLOAT_TO_BFLOAT16_DEFAULT, added functionality to verify remote SHA after upload Trim workflow diagnostics/cleanup, use --rm container, pass GPU_ARCHS input directly
0f313cf to
c533721
Compare
Description
Fixes # (issue)
Type of change
Changes
Checklist: